<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>背景持续渐变效果</title>
  <style>
    body {
      padding: 0;
      margin: 0;
      width: 100vw;
      height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      /* 背景渐变色 */
      background: linear-gradient(125deg, #2c3e50, #27ae60,#2980b9,#e74c3c,#8e44ad);
      /* 指定背景图像大小 */
      background-size: 500%;
      /* 执行动画：动画名 时长 线性 无限播放 */
      animation: bgAnimate 15s linear infinite;
    }
    /* 定义动画 */
    @keyframes bgAnimate {
      0% {
        background-position: 0% 50%;
      }
      50% {
        background-position: 100% 50%;
      }
      100% {
        background-position: 0% 50%;
      }
    }
    :root {
      --bg: #f00;
    }
    .love {
      width: 100px;
      height: 100px;
      background-color: var(--bg);
      border-radius: 10% 10% 10% 20%;
      position: relative;
      box-shadow: 10px 10px 15px rgb(72, 71, 71);
      transform: rotate(-45deg);
    }
    .love::after,
    .love::before {
      content: ' ';
      display: block;
      width: 100%;
      height: 100%;
      border-radius: 50%;
      background-color: var(--bg);
      transform: rotate(-45deg);
      position: absolute;
      top: -50%;
    }
    .love::after {
      right: -50%;
      top: 0;
    }

  </style>
</head>
<body>
  <div class="love"></div>
</body>
</html>